<?php

use think\facade\Route;

$domain = ['Access-Control-Allow-Headers' => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With, token, sign'];

//乡村振兴-商品分类
Route::group('villageProductCate', function () {
    Route::get('/index', 'villageProductCate/index');
});

//乡村振兴-商品
Route::group('villageProduct', function () {
    Route::get('/index', 'villageProduct/index');
    Route::get('/getList', 'villageProduct/getList');
    Route::get('/details', 'villageProduct/details');
    Route::get('/getSpecData', 'villageProduct/getSpecData');
    Route::get('/getSpecValue', 'villageProduct/getSpecValue');
    Route::get('/evaluateList', 'villageProduct/evaluateList');
    Route::post('/qrcode', 'villageProduct/qrcode');
    Route::post('/submit', 'villageProduct/submit')->middleware('verify');
});

//乡村振兴-购物车
Route::group('villageCart', function () {
    Route::get('/index', 'villageCart/index');
    Route::post('/add', 'villageCart/add');
    Route::post('/edit', 'villageCart/edit');
    Route::post('/submit', 'villageCart/submit');
})->middleware('verify');

//乡村振兴-商家
Route::group('VillageBusiness', function () {
    Route::get('/businessList', 'VillageBusiness/businessList');
    Route::get('/getBusiness', 'VillageBusiness/getBusiness');
})->middleware('verify');

//乡村振兴-订单相关
Route::group('villageOrder', function () {
    Route::post('/setTemporary', 'villageOrder/setTemporary');
    Route::get('/getTemporary', 'villageOrder/getTemporary');
    Route::post('/submit', 'villageOrder/submit');
    Route::get('/getPayment/:id', 'villageOrder/getPayment');
    Route::post('/payment', 'villageOrder/payment');
    Route::get('/orderCount', 'villageOrder/orderCount');
    Route::get('/getMyOrder', 'villageOrder/getMyOrder');
    Route::get('/getMyOrderInfo/:id', 'villageOrder/getMyOrderInfo');
    Route::post('/editMyOrder', 'villageOrder/editMyOrder');
    Route::get('/evaluateFront/:id', 'villageOrder/evaluateFront');
    Route::post('/evaluateSave', 'villageOrder/evaluateSave');
    Route::get('/refundFront', 'villageOrder/refundFront');
    Route::post('/refundSave', 'villageOrder/refundSave');
    Route::get('/getMyRefundOrder', 'villageOrder/getMyRefundOrder');
    Route::get('/getMyRefundOrderInfo/:id', 'villageOrder/getMyRefundOrderInfo');
    Route::get('/getExpress', 'villageOrder/getExpress');
    Route::post('/editRefundOrder', 'villageOrder/editRefundOrder');
    Route::get('/orderExp', 'villageOrder/orderExp');
    Route::get('/expInfo', 'villageOrder/expInfo');
    Route::get('/expList', 'villageOrder/expList');
    Route::get('/scanCode', 'villageOrder/scanCode');
    Route::get('/payWay', 'villageOrder/payWay');
    Route::get('/getWocInfo/:id', 'villageOrder/getWocInfo');
})->middleware('verify');

//乡村振兴-提现相关
Route::group('villageDraw', function () {
    Route::get('/rule', 'villageDraw/rule');
    Route::get('/index', 'villageDraw/index');
    Route::post('/save', 'villageDraw/save');
})->middleware('verify');

//乡村振兴-转账相关
Route::group('villageTransfer', function () {
    Route::get('/rule', 'villageTransfer/rule');
    Route::get('/index', 'villageTransfer/index');
    Route::get('/verify', 'villageTransfer/verify');
    Route::post('/save', 'villageTransfer/save');
})->middleware('verify');

Route::group('villageBusinessMall', function () {
    Route::get('/index/:id', 'villageBusinessMall/index');
    Route::get('/getCate/:business_id', 'villageBusinessMall/getCate');
    Route::post('/collect', 'villageBusinessMall/collect')->middleware('verify');
});

